package queryTree;

import java.util.ArrayList;

import optimization.Field;
/**
 * 
 * @author Van
 *
 */

public class And implements BooleanExpr{
	protected BooleanExpr leftArg;
	protected BooleanExpr rightArg;
	public And(BooleanExpr leftArg, BooleanExpr rightArg) {
		this.leftArg = leftArg;
		this.rightArg = rightArg;
	}

	public BooleanExpr getLeftArg() {
		return leftArg;
	}

	public BooleanExpr getRightArg() {
		return rightArg;
	}

	public void getAttrList(ArrayList<Field> l) {
		// TODO Auto-generated method stub
		leftArg.getAttrList(l);
		rightArg.getAttrList(l);
	}

	public String toString(){
		return "(" + leftArg.toString() + " AND " + rightArg.toString() + ")";
	}


}
